﻿<ResourceDictionary 
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:this="clr-namespace:Wpfконфигуратор">

    <this:ObjectToString x:Key="объектКонв" />

    <DataTemplate  x:Key="DataTepmBool" DataType="Boolean" >
        <CheckBox IsChecked="{Binding Path=Значение}"
                                                  Content="{Binding Path=Значение, UpdateSourceTrigger=PropertyChanged}"
                                                  Padding="7,0" VerticalAlignment="Center" VerticalContentAlignment="Center" />
    </DataTemplate>
    <DataTemplate  x:Key="DataTepmNullableBool">
        <CheckBox IsChecked="{Binding Path=Значение}"
                                                  Content="{Binding Path=Значение, UpdateSourceTrigger=PropertyChanged}"
                                                  IsThreeState="True"
                                                  Padding="7,0" VerticalAlignment="Center" VerticalContentAlignment="Center" />
    </DataTemplate>
    
    <DataTemplate  x:Key="DataTepmChecBoxПросмотр">
        <CheckBox IsChecked="{Binding Path=Значение}"
                                                  Content="{Binding Path=Значение}"
                                                  IsEnabled="False"
                                                  Padding="7,0" VerticalAlignment="Center" VerticalContentAlignment="Center" />
    </DataTemplate>
    
    <DataTemplate x:Key="Перечислитель">
              <ComboBox ItemsSource="{Binding  Path=СписокПеречислителя}" 
                                SelectedItem="{Binding   Path= Значение, Mode=TwoWay}" />
      
    </DataTemplate>
    
    <DataTemplate x:Key="Флаг">
            <StackPanel Name="FF"  Orientation="Horizontal">
                <TextBox Text="{Binding Path=Значение, Mode=TwoWay}"  />
                <ComboBox  ItemsSource="{Binding  Path=СписокПеречислителя, UpdateSourceTrigger=PropertyChanged}" 
                                                  Text="{Binding   Path= Значение, Mode=TwoWay}"  />
            </StackPanel>
    </DataTemplate>
    
    <DataTemplate x:Key="TextBoxDef">
        <TextBox Text="{Binding Path=Значение, Mode=TwoWay}" Padding="0" BorderThickness="0" />
    </DataTemplate>
    
    <DataTemplate x:Key="TextBoxDefR">
        <TextBlock Text="{Binding Path=Значение}"  />
    </DataTemplate>
    
</ResourceDictionary>
